/**
 * Created by OneDream on 2016/1/7.
 */
function GetQueryString(name)
{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null) {
        return r[2];
    }
}
$(document).ready(function(){
    var height=$(window).height();
    var width=$(window).width();
    $("#container").css("height",height);
    $("#info").css("height","10%");
    $("#back").click(function(){
        localStorage.setItem("iframesrc","contact");
        history.back();

    });
$("#send_message").click(function(){
    var account=GetQueryString("account");
    var icon=GetQueryString("icon")+".jpg"
    var nickname=GetQueryString("nickname");
    var address=GetQueryString("address");
    window.location.href="chat.html?account="+account+"&icon="+icon+"&nickname="+nickname+"&address="+address;
});
//alert("---"+GetQueryString("account"))
$("#account").html("微信号："+GetQueryString("account"));
$("#icon img").attr("src","image/"+GetQueryString("icon")+".jpg");
$("#nickname").html("昵称："+GetQueryString("nickname"));
$("#address").html("地区："+GetQueryString("address"));
});